package org.jeecg.modules.demo.pointcount.redis.thread.work;

import org.jeecg.modules.demo.pointcount.entity.OnlineData;
import org.jeecg.modules.demo.pointcount.redis.consumer.SendAndStorageProcess;
import org.jeecg.modules.demo.pointcount.service.IOnlineDataService;

/**
 * @Author yw
 * @Date 2021/3/26 15:00
 */
public class UpdateOnlineDataTask implements Runnable{

    private static SendAndStorageProcess sendAndStorageProcess;

    IOnlineDataService onlineDataService;

    private OnlineData data;


    public UpdateOnlineDataTask(IOnlineDataService onlineDataService, OnlineData data){
        this.data = data;
        this.onlineDataService=onlineDataService;
    }




    public UpdateOnlineDataTask(OnlineData data){
        this.data = data;
    }

    public void run() {
        this.onlineDataService.updateOnlineData(data);
    }
}
